package org.overmind.ieat.server.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Created by Overmind on 14.02.2015.
 */
@Entity
@Table(name = "sets", schema = "", catalog = "ieat")
public class SetsEntity {
    private int foodId;

    @Id
    @Column(name = "food_id")
    public int getFoodId() {
        return foodId;
    }

    public void setFoodId(int foodId) {
        this.foodId = foodId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SetsEntity that = (SetsEntity) o;

        if (foodId != that.foodId) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return foodId;
    }
}
